
function SourceViewer_showSourceCodeTab(id) {
    var tab = document.getElementById(id);
    var siblings = tab.parentNode.getElementsByTagName("DIV");
    for(var i = 0; i < siblings.length; i++) {
        if(siblings[i].getAttribute("IsTabContents")) {
            siblings[i].style.display = "none";
            document.getElementById(siblings[i].id + "_title").className = "Tab";
        }
    }
    tab.style.display = "block";
    document.getElementById(id + "_title").className = "Tab TabSelected";
    
    // Scroll to top
    tab.parentNode.scrollTop = 0;
}